$(function () {
    getNews();
})
function getNews() {
    $.ajax({
        url:requestUrl+"front/activity/pageList.do",
        type:"GET",
        dataType:"JSON",
        success:function(json){
            if (json.code==0){
                $(json.data).each(function (i,o) {
                if(o.logoUrl!==""){
                    var titlelb = $(" <a href='hdlb.html?name="+o.id+"'><div class='news-card'><div class='newsCdiv newsDivImg'><img src='"+o.logoUrl+"' class='news-img'></div><div class='newsCdiv newsInfo'><div class='news-titile'>"+o.title+"</div><div class='data'><span>"+o.releaseTimeStr+"</span></div></div></div></a>").appendTo(".news-all");
                }else{
                    var titlelb = $(" <a href='hdlb.html?name="+o.id+"'><div class='news-card'><div class='newsCdiv newsDivImg'><img src='images/newslogo.jpg' class='news-img'></div><div class='newsCdiv newsInfo'><div class='news-titile'>"+o.title+"</div><div class='data'><span>"+o.releaseTimeStr+"</span></div></div></div></a>").appendTo(".news-all");
                }

                })
            }else{
                alert(json.message)
            }
        }
    })
}